<template>
    <span>{{obj[value] | timeDown}}</span>
</template>
<script>
  import {showCountDown} from '@/utils/workflowUtils'
  export default {
    name: 'timeRender',
    props: {
      obj: {
        type: Object,
        default: function () {
          return {}
        }
      },
      value: String
    },
    filters: {
      timeDown (value) {
        if (value || value === 0) {
          return showCountDown(value)
        }
        return ''
      }
    }
  }
</script>

<style scoped lang="stylus">
  @import '../../../../../assets/common.styl';
  .red
    color $c-pink
</style>
